package com.menghang.jitpack;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.sixbing.android.topstatebar.StateBarView;

public class MainActivity extends AppCompatActivity {

    TextView textView;
    StateBarView stateBarView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        textView = findViewById(R.id.text);
        stateBarView = findViewById(R.id.state_view);
        getWindow().getDecorView().postDelayed(new Runnable() {
            @Override
            public void run() {
                textView.setText("当前状态栏高度:" + stateBarView.getStatusBarHeight() + "px");
            }
        }, 500);

    }
}
